﻿//////////////////////////////////////////////////////////////////////////////////////
///// End.cs                                                               /////
///// 스테이지의 끝                                                   /////
//////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    public class End : GameScreen
    {
        #region Declarations
        
        Texture2D endTexture;

        #endregion

        #region Load
        
        public End()    {   }
        public override void LoadContent(ContentManager content)
        {
            endTexture = content.Load<Texture2D>("Texture/end");
        }

        #endregion

        #region Update & Draw
        
        public override void Update(Touch touch, GameTime gameTime)
        {
            foreach (GestureSample gesture in touch.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    screenManager.RemoveScreen(this);
                    screenManager.AddScreen(new Background());

                    GameConstants.NextStage();
                }
            }
        }
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            spriteBatch.Draw(endTexture, new Vector2(0, 0), Color.White);
        }

        #endregion
    }
}
